<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="en" class="no-js" id="ng-app">
<head>
<meta charset="UTF-8">
<jsp:include page="/includes/common/head.jsp" />
<link rel=stylesheet href="css/standard.css" type="text/css">
<title>CS4280 BOOKSTORE</title>
</head>
<body>
	<div data-flex-background-src="${ baseURL }/assets/img/background.jpg" flex-background></div>
	<jsp:include page="/includes/header.jsp">
   		<jsp:param name="currentUser" value="${currentUser}" /><jsp:param name="baseURL" value="${ baseURL }" />
	</jsp:include>
	<section id="mainContent">
		<c:if test="${status == 'DONE'}">
			<p>You have successfully purchased ${book.title}.</p>
			<c:if test="${lp_use != null}">
				<p>${lp_use}LP is used for the purchase.</p>
			</c:if>
			<p>Invoice no.: ${invoice.id}</p>
			<p>Thank you for using our services!</p>
			<a href="${ baseURL }/home">BACK TO HOME</a>
		</c:if>

		<c:if test="${status == 'INVALID_QTY'}">
			<p>Sorry, ${book.title} is currently out of stock.</p>
			<a href="${ baseURL }/home">BACK TO HOME</a>
		</c:if>

		<c:if test="${status == 'INSUFF_LP'}">
			<p>Sorry, You do not have enough LP for the purchase.</p>
			<a href="${ baseURL }/book?id=${book.id}">BACK</a>
		</c:if>

		<c:if test="${status == 'INVALID_LP'}">
			<p>Please input a number for LP.</p>
			<a href="${ baseURL }/book?id=${book.id}">BACK</a>
		</c:if>
	</section>
</body>
</html>
